<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<h:outputStylesheet name="common-style.css" library="css" />
	<title>Tiền gửi tiết kiệm không kỳ hạn</title>
	<link rel="shortcut icon" type="image/x-icon"
		href="#{request.contextPath}/resources/images/favicon.ico" />
</h:head>
<h:body style="font-size: 11px;">
	<p:layout style="height:800px;width:1200px; margin:0 auto;" id="layout">
		<p:layoutUnit position="center">
			<p:graphicImage value="/resources/images/MDB.jpg" width="250"
				height="90" />
			<p:tabMenu activeIndex="2">
				<p:menuitem value="Trang chính" url="/MainPage.xhtml"
					icon="ui-icon-star" />
				<p:menuitem value="Tiền gửi tiết kiệm có kỳ hạn"
					url="/FixedDeposits.xhtml" icon="ui-icon-star" />
				<p:menuitem value="Tiền gửi tiết kiệm không kỳ hạn"
					url="/Nonterm.xhtml" icon="ui-icon-star" />
				<p:menuitem value="Tiền gửi tiết kiệm kết hợp" url="/Combo.xhtml"
					icon="ui-icon-star" />
				<p:menuitem value="Hỗ trợ" url="/Support.xhtml" icon="ui-icon-star" />
				<p:menuitem value="Liên hệ" url="/Contact.xhtml" icon="ui-icon-star" />
			</p:tabMenu>

			<p:ajaxStatus onstart="modalDialogTest.show();"
				onsuccess="modalDialogTest.hide();" />
			<p:dialog id="modalDialog" showHeader="false" closable="true"
				widgetVar="modalDialogTest" modal="true">
				<p:graphicImage value="/resources/images/482.GIF" />
			</p:dialog>
			<h:form id="frmPID">
				<p:panel
					header="CHƯƠNG TRÌNH KHUYẾN MÃI DÀNH CHO TIỀN GỬI TIẾT KIỆM KHÔNG KỲ HẠN">
					<p:growl id="growl_ID" showDetail="true" sticky="true" />
					<p:panelGrid columns="4" style="width:90%;margin:0 auto;"
						id="frmPIDFDID">
						<f:facet name="header">
							<h:outputText value="Số sổ tiết kiệm không kỳ hạn:  *"
								style="float:left;" />
							<p:inputText value="#{processCSBeans.accountLockedNo}"
								style="float:left;height:20px;" />
							<p:commandButton value="Xem thông tin"
								action="#{processCSBeans.searchCasafromT24P}"
								update="frmLockFundInfo,frmPIDFDID,frmPIDFDID_Details,frmPIDFDID_Details1,:frmPID:growl_ID"
								icon="ui-icon-search" style="float:left;" />

						</f:facet>
						<h:outputText value="Mã khách hàng: " />
						<h:outputText value="#{processCSBeans.casa.customerId}"
							styleClass="textBold" />

						<h:outputText value="Tên khách hàng: " />
						<h:outputText value="#{processCSBeans.casa.customerName}"
							styleClass="textBold" />

						<h:outputText value="Số CMND: " />
						<h:outputText value="#{processCSBeans.casa.legalId}"
							styleClass="textBold" />
						<h:outputText value="Ngày cấp: " />
						<h:outputText value="#{processCSBeans.casa.legalIssDate}"
							styleClass="textBold">
							<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
						</h:outputText>


						<h:outputText value="Số dư tài khoản(VND): " />
						<h:outputText value="#{processCSBeans.casa.wbBalances}"
							styleClass="textBold">
							<f:convertNumber locale="en" pattern="#,##0.00;(#,##0.00)" />
						</h:outputText>
						<h:outputText value="Lãi xuất(%): " />
						<h:outputText value="#{processCSBeans.casa.interestRate}%"
							styleClass="textBold" />
						<h:outputText value="Người tạo" />
						<h:outputText value="#{processCSBeans.casa.createdBy}"
							styleClass="textBold" />

						<h:outputText value="Chi nhánh: " />
						<h:outputText value="#{processCSBeans.casa.branchCode}"
							styleClass="textBold" />
					</p:panelGrid>

					<p:panelGrid columns="4" style="width:90%; margin:0 auto;"
						id="frmLockFundInfo">
						<f:facet name="header">
							<h:outputText value="Thông tin cam kết" style="float:left;" />
						</f:facet>
						<h:outputText value="Ngày cam kết " />
						<p:inputText value="#{processCSBeans.casa.dateLocked}"
							disabled="#{processCSBeans.componentVisible == false}" readonly="true">
							<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
							</p:inputText>
						
						<h:outputText value="Số tiền cam kết(VND)" />
						<p:inputText value="#{processCSBeans.casa.amountLocked}"
							style="width:200px;"
							disabled="#{processCSBeans.componentVisible == false}"
							readonly="true">
							<f:convertNumber locale="en" pattern="#,##0.00;(#,##0.00)" />
						</p:inputText>


						<h:outputText value="Thời hạn cam kết(ngày)" />
						<p:inputText value="#{processCSBeans.casa.termLocked}"
							disabled="#{processCSBeans.componentVisible == false}" />
						<h:outputText value="Ngày hết hạn cam kết" />
						<p:inputText value="#{processCSBeans.casa.endDateLocked}"
							readonly="true" style="width:200px;"
							disabled="#{processCSBeans.componentVisible== false}">
							<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
						</p:inputText>

					</p:panelGrid>

					<p:panelGrid columns="1" style="width:90%; margin:0 auto;"
						id="frmPIDFDID_Details">
						<f:facet name="header">
							<p:commandButton value="Tính toán mã dự thưởng, thẻ cào"
								action="#{processCSBeans.calculateCasa}"
								update="frmLockFundInfo,frmPIDFDID,frmPIDFDID_Details,frmPIDFDID_Details1,growl_ID"
								icon="ui-icon-calculator"
								disabled="#{processCSBeans.componentVisible == false}"
								style="float:left;" />
						</f:facet>
						<p:row>
							<h:outputText value="Thẻ cào tích lũy cộng dồn trước đó: " />
							<h:outputText
								value="#{processCSBeans.totalScradAvailable} (Thẻ cào)"
								style="font-weight:bold;" />
							<p:separator />
							<h:outputText value="Số dự thưởng: " />
							<h:outputText
								value="#{processCSBeans.casa.luckyDraw}(Mã dự thưởng)  "
								style="font-weight:bold;" />

							<h:outputText value=",    Số thẻ cào: " />
							<h:outputText value="#{processCSBeans.casa.scCard} (Thẻ cào)"
								style="font-weight:bold;" />
							<p:separator id="separator2" />
							<h:outputText value="Số áo thun: " />
							<h:outputText value="#{processCSBeans.casa.bagGift} (Cái) "
								style="font-weight:bold;" />
							<h:outputText value="hoặc Số khay mứt: " />
							<h:outputText value="#{processCSBeans.casa.trayGift} (Cái)"
								style="font-weight:bold;" />
						</p:row>
					</p:panelGrid>
					<p:panelGrid columns="4" style="width:90%; margin:0 auto;"
						id="frmPIDFDID_Details1">
						<f:facet name="header">
						<h:outputText
								value="Chi tiết thẻ cào"
								style="float:left;" />
							<h:outputText
								value="Nhập chi tiết thẻ cào theo định dạng: ms1, ms2, ms3,..."
								style="float:right;color:red;font-style:italic;" />
						</f:facet>
						<h:outputText value="Số áo thun khách hàng nhận" style="color:red;" />
						<p:inputText value="#{processCSBeans.casa.bgiftReceived}"
							disabled="#{processCSBeans.casa.bagGift == 0}" required="true"
							requiredMessage="Nhập số 0 nếu khách hàng không nhận áo thun">
							<f:convertNumber integerOnly="true" type="number" />
						</p:inputText>
						<h:outputText value="Số khay mứt khách hàng nhận" style="color:red;" />
						<p:inputText value="#{processCSBeans.casa.tgiftReceived}"
							disabled="#{processCSBeans.casa.trayGift == 0}" required="true"
							requiredMessage="Nhập số 0 nếu khách hàng không nhận khay mứt">
							<f:convertNumber integerOnly="true" type="number" />
						</p:inputText>

						<h:outputText value="Số thẻ cảm ơn (Thẻ cào không trúng)" />
						<p:inputText value="#{processCSBeans.number00k}"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" required="true"
							requiredMessage="Nhập số 0 nếu không có thẻ cảm ơn khách hàng">
							<f:convertNumber integerOnly="true" type="number" />
						</p:inputText>
						<h:outputText value="Chi tiết" />
						<p:inputText style="width:200px;" disabled="true" />

						<h:outputText value="Số thẻ 20K" />
						<p:inputText value="#{processCSBeans.number20k}"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" required="true"
							requiredMessage="Nhập số 0 nếu không có thẻ cào 20,000VND">
							<f:convertNumber integerOnly="true" type="number" />
						</p:inputText>
						<h:outputText value="Chi tiết" />
						<p:inputTextarea  value="#{processCSBeans.detail20k}" autoResize="true" rows="1"
							style="width:300px;"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" />

						<h:outputText value="Số thẻ 50K" />
						<p:inputText value="#{processCSBeans.number50k}"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" required="true"
							requiredMessage="Nhập số 0 nếu không có thẻ cào 50,000VND">
							<f:convertNumber integerOnly="true" type="number" />
						</p:inputText>
						<h:outputText value="Chi tiết" />
						<p:inputTextarea  value="#{processCSBeans.detail50k}" autoResize="true" rows="1"
							style="width:300px;"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" />
						<h:outputText value="Số thẻ 100K" />
						<p:inputText value="#{processCSBeans.number100k}"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" required="true"
							requiredMessage="Nhập số 0 nếu không có thẻ cào 100,000VND">
							<f:convertNumber integerOnly="true" type="number" />
						</p:inputText>
						<h:outputText value="Chi tiết" />
						<p:inputTextarea  value="#{processCSBeans.detail100k}" autoResize="true" rows="1"
							style="width:300px;"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" />
						<h:outputText value="Số thẻ 200K" />
						<p:inputText value="#{processCSBeans.number200k}"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" required="true"
							requiredMessage="Nhập số 0 nếu không có thẻ cào 200,000VND">
							<f:convertNumber integerOnly="true" type="number" />
						</p:inputText>
						<h:outputText value="Chi tiết" />
						<p:inputTextarea  value="#{processCSBeans.detail200k}" autoResize="true" rows="1"
							style="width:300px;"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" />
						<h:outputText value="Số thẻ 500K" />
						<p:inputText value="#{processCSBeans.number500k}"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" required="true"
							requiredMessage="Nhập số 0 nếu không có thẻ cào 500,000VND">
							<f:convertNumber integerOnly="true" type="number" />
						</p:inputText>
						<h:outputText value="Chi tiết" />
						<p:inputTextarea  value="#{processCSBeans.detail500k}" autoResize="true" rows="1"
							style="width:300px;"
							disabled="#{processCSBeans.casa.luckyDraw == 0}" />

						<f:facet name="footer">
							<p:commandButton value="Lưu"
								action="#{processCSBeans.addNewCasaP}"
								update="downloadLink11,frmPIDFDID,frmPIDFDID_Details,frmPIDFDID_Details1,growl_ID"
								icon="ui-icon-disk"
								disabled="#{processCSBeans.btnSaveVisible == false}"
								style="margin:0">
							</p:commandButton>
							<p:commandButton id="downloadLink11"
								action="#{processCSBeans.downloadPrevented}"
								disabled="#{processCSBeans.btnVisible == false}"
								value="In phiếu thông tin" ajax="false" icon="ui-icon-print">
								<p:fileDownload value="#{processCSBeans.file}" />
							</p:commandButton>

						</f:facet>
					</p:panelGrid>
				</p:panel>
			</h:form>

			<h:outputText
				value="Bản quyền &#169; 2013 Ngân hàng TMCP Phát Triển Mê Kông. Xây dựng bởi Đỗ Đức Tú."
				style="font-style:italic;" />

		</p:layoutUnit>

	</p:layout>
</h:body>
</html>